package com.example.demo.entity;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

public class Person {
    @JSONField(name="AGE")
    private int age;

    @JSONField(name="FULL NAME",ordinal = 1)
    private String fullName;

    //使用format参数对指定字段进行格式化date
    @JSONField(name="DATE OF BIRTH",format = "dd-MM-yyyy",ordinal = 2)
    private Date dateofbirth;

    public int getAge() {
        return age;
    }

    public String getFullName() {
        return fullName;
    }

    public Date getDateofbirth() {
        return dateofbirth;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public void setDateofbirth(Date dateofbirth) {
        this.dateofbirth = dateofbirth;
    }

    public Person(int age,String fullName,Date dateofbirth){
        super();
        this.age=age;
        this.fullName=fullName;
        this.dateofbirth=dateofbirth;
    }
}
